package com.googlecode.wicketcharts.highcharts.options;

/**
 * Defines either a predefined symbol or a custom symbol represented by an URL.
 * 
 * @see <a href="http://api.highcharts.com/highcharts#plotOptions.area.marker.symbol">http://api.highcharts.com/highcharts#plotOptions.area.marker.symbol</a>
 * @author Tom Hombergs (tom.hombergs@gmail.com)
 * 
 */
public class Symbol extends JsonObject {

	private static final long serialVersionUID = 1L;

	private PredefinedSymbol predefinedSymbol;

	private String url;

	public Symbol(PredefinedSymbol predefinedSymbol) {
		this.predefinedSymbol = predefinedSymbol;
	}

	public Symbol(String url) {
		this.url = url;

	}

	public void setPredefinedSymbol(PredefinedSymbol predefinedSymbol) {
		this.predefinedSymbol = predefinedSymbol;
	}

	public PredefinedSymbol getPredefinedSymbol() {
		return predefinedSymbol;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUrl() {
		return url;
	}

	public enum PredefinedSymbol {

		CIRCLE("circle"),

		SQUARE("square"),

		DIAMOND("diamond"),

		TRIANGLE("triangle"),

		TRIANGLEDOWN("triangle-down");

		private final String code;

		private PredefinedSymbol(String code) {
			this.code = code;
		}

		public String getCode() {
			return code;
		}
	}

}
